package com.example.giftrecord.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 礼金记录表
 * </p>
 *
 * @author example
 * @since 2023-07-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class GiftRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 关系
     */
    private String relationship;

    /**
     * 金额
     */
    private BigDecimal amount;

    /**
     * 类型(in:收入, out:支出)
     */
    private String type;

    /**
     * 日期
     */
    private LocalDate date;

    /**
     * 备注
     */
    private String notes;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("created_at")
    private LocalDateTime createdAt;


}
    